<template>
    <el-dialog
        :modal="false"
        :modal-append-to-body="false"
        :visible="item.display !== false"
        @close="itemClose"
        width="500px"
    >
        <span
            class="el-dialog__title"
            slot="title"
        >{{ item.title }} {{ item.lastValue ? `(${item.lastValue})` : '' }}</span>
        <el-input-number v-model="item.content"></el-input-number>
        <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="itemInput">确 定</el-button>
        </span>
    </el-dialog>
</template>
<script>
export default {
    name: 'input-item',
    props: ['item'],
    methods: {
        itemClose() {
            this.$emit('itemClose', this.item)
        },
        itemInput() {
            this.$emit('itemInput', this.item)
        }
    }
}
</script>

